package com.mym.domain;

import org.junit.jupiter.api.Test;

/**
 * @author miao
 * @version 1.0
 * @date 2025/4/9 17:07
 * @description
 */
public class Boos {
    public String name;
    public int hp;
    public int attack;

    public Boos() {
    }

    public Boos(String name, int hp, int attack) {
        this.name = name;
        this.hp = hp;
        this.attack = attack;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHp() {
        return hp;
    }

    public void setHp(int hp) {
        this.hp = hp;
    }

    public int getAttack() {
        return attack;
    }

    public void setAttack(int attack) {
        this.attack = attack;
    }

    public void attackMove(){

    }
    public void move(){

    }
}
class Snake extends Boos{
    public int Heal(int hp){
        if (hp<10){
            this.hp=hp+20;
        }
        return this.hp;
    }
    @Override
    public void attackMove() {
        super.attackMove();
        System.out.println("怪物蛇妖甲展开攻击");
        System.out.println("当前生命值是："+this.hp);
        System.out.println("攻击力是："+this.attack);
        System.out.println("实施大蛇补血术。。。。。。，当前生命值为"+this.hp);
    }

    @Override
    public void move() {
        super.move();
        System.out.println("我是蛇怪，我走s型路线");
    }
}
class Centipede extends Boos{
    @Override
    public void attackMove() {
        super.attackMove();
        System.out.println("我是蜈蚣乙展开攻击");
        System.out.println("当前生命值是："+this.hp);
        System.out.println("攻击力是："+this.attack);
    }

    @Override
    public void move() {

        System.out.println("我是蜈蚣精，御风飞行");
    }
}
class test{
    public static void main(String[] args) {
        Snake snake = new Snake();

    }
}


